<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	
	<div id="we" user="{name: 123, age: 123}"></div>
	<script type="text/javascript">
		var arr = [
		  { id: 1, text: 'aa', done: true },
		  { id: 2, text: 'bb', done: false }
		]
		var num = 2
		var arr2 = arr.filter(function (item) {
		  return item.id == num;
		});
		console.log(arr2)
		console.log(document.getElementById('we').getAttribute('user'))

		var o = {}
		// o[1].name = 'zcv';
		console.log(o)
		var o2 = { name: 'zcdd'};
		o2['name'] = 'ytf'
		console.log(o2)
		var a = []
		a[1] = 12
		// a[1]['name'] = 'qwe'
		// a[2].name = 'rtye'
		console.log(a)

	</script>
</body>
</html>